Smartphone and tablet devices are widely used as user terminal interfaces. These devices are programmable and come with a growing number of powerful embedded sensors, such as an accelerometer, a gyroscope, a global positioning system (GPS), a digital compass, and a camera, which are enabling new sensing application across a wide variety of domains.